package com.study.design.builder.str;

/**
 * @Author 网易云课堂微专业-java高级开发工程师【allen老师】
 * @Version 1.0
 */
public class AllenStringBuilder extends AbstractStringBuilder {
    public AllenStringBuilder() {
        super(16);
    }

    @Override
    public String toString() {
        // Create a copy, don't share the array
        return new String(value, 0, count);
    }

}

class Allen {

    private int age;
    private String name;

    public int getAge() {
        return age;
    }

    public String getName() {
        return name;
    }

    public Allen appenAllen(char c) {
        return this;
    }

    public Allen setName(String name) {
        setName(name);
        return this;
    }

    public Allen setAge(int age) {
        setAge(age);
        return this;
    }
}
